/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.sms.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 店面诊断模板详细Entity
 * @author liujiang
 * @version 2013-08-01
 */
@Entity
@Table(name = "store_diagnose_template_detail")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class StoreDiagnoseTemplateDetail extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private Long id; 		// 店面诊断模版明细参数编号
	private StoreDiagnoseTemplate storeDiagnoseTemplate; 		// 店面诊断模版编号
	private int sequence; 	// 编号
	private String item_group; // 项目名称
	private String item;	// 小项目名称
	private Float rate;	// 计算比率
	private Float standard_value;    //标准值
	private StoreDiagnoseFomula storeDiagnoseFomula;  // 理论业绩计算公式类型
	
	public StoreDiagnoseTemplateDetail() {
	}

	public StoreDiagnoseTemplateDetail(Long id){
		this();
		this.id = id;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name="SDT_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public StoreDiagnoseTemplate getStoreDiagnoseTemplate() {
		return storeDiagnoseTemplate;
	}

	public void setStoreDiagnoseTemplate(StoreDiagnoseTemplate storeDiagnoseTemplate) {
		this.storeDiagnoseTemplate = storeDiagnoseTemplate;
	}
	
	public int getSequence() {
		return sequence;
	}

	public void setSequence(int sequence) {
		this.sequence = sequence;
	}

	public String getItem_group() {
		return item_group;
	}

	public void setItem_group(String item_group) {
		this.item_group = item_group;
	}

	public String getItem() {
		return item;
	}

	public void setItem(String item) {
		this.item = item;
	}

	public Float getRate() {
		return rate;
	}

	public void setRate(Float rate) {
		this.rate = rate;
	}

	public Float getStandard_value() {
		return standard_value;
	}

	public void setStandard_value(Float standard_value) {
		this.standard_value = standard_value;
	}

	@ManyToOne
	@JoinColumn(name="FORMULA")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public StoreDiagnoseFomula getStoreDiagnoseFomula() {
		return storeDiagnoseFomula;
	}

	public void setStoreDiagnoseFomula(StoreDiagnoseFomula storeDiagnoseFomula) {
		this.storeDiagnoseFomula = storeDiagnoseFomula;
	}
}


